# -*- coding: utf-8 -*-
import os
import sys
import time
import random

# skill fun

def fun_dizziness(dizziness_stu, aggressor):
    dizziness_stu -= 1
    if dizziness_stu > 0:
        print('\033[35m%s\033[0m is dizziness and left \033[34m%s\033[0m time! Zzz~' % (aggressor, str(dizziness_stu)))
    elif dizziness_stu == 0:
        print('\033[35m%s\033[0m is dizziness and  will be fine in next time !' % aggressor)
    return dizziness_stu

def fun_silence(silence_stu, aggressor):
    silence_stu -= 1
    if silence_stu > 0:
        print (
        '\033[35m%s\033[0m is still silence and left \033[34m%s\033[0m time! ... ...' % (aggressor, str(silence_stu)))
    elif silence_stu == 0:
        print('\033[35m%s\033[0m is silence and  will be fine in next time !' % aggressor)
    return silence_stu

def fun_poison(blood, poison_stu, aggressor):
    hurt_n = 50
    poison_stu -= 1
    if poison_stu > 0:
        print('\033[35m%s\033[0m is poison and get \033[31m%s\033[0m hurt! @#$~\npoison state left \033[34m%s\033[0m times!'
              % (aggressor, str(hurt_n), str(poison_stu)))
    elif poison_stu == 0:
        print('\033[35m%s\033[0m is poison and get \033[31m%s\033[0m hurt! @#$~\nPoison state is clear!'
              % (aggressor, str(hurt_n)))
    if blood > hurt_n:
        blood -= hurt_n
        print("\033[35m%s\033[0m blood losing : \033[31m%s\033[0m" % (aggressor, hurt_n))
        print("\033[35m%s\033[0m left blood : \033[32m%s\033[0m" %(aggressor, blood))
        return blood, poison_stu
    else:
        print("\033[35m%s\033[0m is dead by poison ! @#$" % aggressor)
        return 0, poison_stu

